<?php
class Application_Form_Helper extends Zend_Form_Element_Text
{
    public function __construct ($options = null, $label)
    {
        parent::__construct($options);
        $this->setLabel($label)
            ->setRequired(true)
            ->addFilter('StripTags')
            ->addFilter('StringTrim');
    }
    public function init ()
    {
        /* Form Elements & Other Definitions Here ... */
    }
//    static public $formDecorators = array(
//        'FormElements',
//        array('HtmlTag', array('tag' => 'table', 'class' => 'formDataGrid')),
//        array('Form', array('class'=>'formDiv')),
//    );
//    static public $elementDecorators = array(
//        'ViewHelper',
//        array('Description', array('tag' => 'span', 'escape' => false, 'class' => 'formNote')),
//        'Errors',
//        array(array('data' => 'HtmlTag'), array('tag' => 'td')),
//        array('Label', array('tag' => 'th', 'escape' => false)),
//        array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'class'=>'alignTop')),
//    );
static public $formDecorators = array(
        'FormElements',
        array('HtmlTag', array('tag' => 'table', 'class' => 'formDataGrid')),
        array('Form', array('class'=>'formDiv')),
    );
    
    static public $formDecoratorsResetWidth = array(
        'FormElements',
        array('HtmlTag', array('tag' => 'table', 'class' => 'formDataGrid formDataGridResetCellWidth')),
        array('Form', array('class'=>'formDiv')),
    );
    
    static public $hiddenDecorators = array(
        'ViewHelper',
    );
    
    static public $hiddenDecoratorsWithDesc = array(
        'ViewHelper',
        array('Description', array('tag' => 'span', 'escape' => false)),
        array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class' => 'formNote', 'colspan' => 2)),
        array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
    );
    
    static public $elementDecorators = array(
        'ViewHelper',
        array('Description', array('tag' => 'span', 'escape' => false, 'class' => 'formNote')),
        'Errors',
        array(array('data' => 'HtmlTag'), array('tag' => 'td')),
        array('Label', array('tag' => 'th', 'escape' => false)),
        array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'class'=>'alignTop')),
    );
        
    static public $elementDecoratorsNoLabel = array(
        'ViewHelper',
        array('Description', array('tag' => 'span', 'escape' => false, 'class' => 'formNote')),
        'Errors',
        array(array('data' => 'HtmlTag'), array('tag' => 'td', 'colspan' => 2)),
        array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'class'=>'txtAlignCenter')),
    );
    
    static public $fileDecorators = array(
        'File',
        array('Description', array('tag' => 'span', 'escape' => false)),
        'Errors',
        array(array('data' => 'HtmlTag'), array('tag' => 'td')),
        array('Label', array('tag' => 'th', 'escape' => false)),
        array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'class'=>'alignTop')),
    );
    
    static public $descDecorators = array(
        'ViewHelper',
        array('Description', array('tag' => 'span', 'escape' => false)),
        array(array('data' => 'HtmlTag'), array('tag' => 'td')),
        array('Label', array('tag' => 'th')),
        array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
    );
    
    static public $buttonDecorators = array(
        'ViewHelper',
        array('Description', array('escape' => false, 'tag'=>'span')),
        array(array('data' => 'HtmlTag'), array('tag' => 'td', 'colspan' => 2, 'class' => 'txtAlignCenter')),
        array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
    );
        
    static public $hiddenDecoratorsButtonAdd = array(
        'ViewHelper',
        array('Description', array('tag' => 'span', 'escape' => false)),
        array(array('data' => 'HtmlTag'), array('tag' => 'td')),
        array(array('label' => 'HtmlTag'), array('tag' => 'th', 'placement' => 'prepend')),
        array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
    );
        
    static public $formResponsessetDecorators = array(
    	array('ViewScript', array('viewScript' => 'Form/responsesset.phtml'))
    );
    
    
    static public $radioButtonDecorators = array(
    	'ViewHelper',
    	array('Description',array("tag"=>'span','escape'=>false)),
    	array(array('data'=>"HtmlTag"),array('tag'=>'td')),
    	array(array('label' => 'HtmlTag'), array('tag' => 'th', 'placement' => 'prepend')),
    	array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
    
    );
    
    static public $quizLangFormDecorator = array(
    	array("ViewScript", array('viewScript'=>"Form/quizForms/langform.phtml"))    
    );
    
    static public $quizTemplateFormDecorator = array(
        array("ViewScript", array('viewScript'=>"Form/quizForms/templateform.phtml"))    
    );
    
    static public $quizOptionFormDecorator = array(
        array("ViewScript", array('viewScript'=>"Form/quizForms/advancedoptionsform.phtml"))    
    );
}

